

Illustration of the geometric interpretation of a recurrence relation in A008288, the Delannoy numbers.

					Shel Kaphan, 2 Jan 2023

D(i,0) = D(0,j) = 1
D(i,j) = D(i,j-1) + 2*Sum_{k=0..i-1} D(k,j-1), or, because D(i,j) = D(j,i),
D(i,j) = D(i-1,j) + 2*Sum_{k=0..j-1} D(i-1,k)


D(1,1) = 3, the number of points at distance <= 1 from a point in 1 dimension:

   o x o

Using the recurrence D(2,1) = D(1,1) + 2*D(1,0),
which is 3 + 2*1 = 5, we obtain:

 o o x o o

D(2,1) = 5, the number of points at distance <= 2 from a point in 1 dimension:

Using the recurrence D(2,2) = D(2,1) + 2*(D(1,1)+D(0,1))
which is 5 + 2*(3+1) = 13, we obtain:

     o
   o o o
 o o x o o
   o o o
     o

D(2,2) = 13, the number of points at distance <= 2 from a point in 2 dimensions.

Using the recurrence D(2,3) = D(2,2) + 2*(D(1,2) + D(0,2))
which is 13 + 2*(5+1) = 25, we obtain

  o
    o
  o o o
    o
       o
     o o o
   o o x o o
     o o o
       o
          o
        o o o
          o
             o

(Visualize this in 3 dimensions as a stack of planes)

D(2,3) = 25, the number of points at distance <= 2 from a point in 3 dimensions.



Referring back to D(1,1) above:

  o x o

Using the recurrence D(1,2) = D(1,1) + 2*D(1,0),
which is 3 + 2*1 = 5, we obtain:

    o
  o x o
    o

D(1,2) = 5, the number of points at distance <= 1 from a point in 2 dimensions.

Using the recurrence D(2,2) = D(1,2) + 2*(D(1,1) + 2*D(1,0)),
which is 5 + 2*(3+1) = 13, we obtain:


          o
        o   o
                                        o
          o                           o o o
   o    o x o    o      =>          o o x o o
          o                           o o o
                                        o
        o   o
          o


D(2,2) = 13, the number of points at distance <= 2 in 2 dimensions.
